package com.feimaopian.service;

import com.feimaopian.entity.Article;
import com.feimaopian.mapper.ArticleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleServiceImpl implements ArticleService{
    @Autowired
    ArticleMapper articleMapper;

    @Override
    public List<Article> findAll() {
        return articleMapper.findAll();
    }

    @Override
    public int updateById(Article article) {
        return articleMapper.updateById(article);
    }

    @Override
    public int deleById(int id) {
        return articleMapper.deleById(id);
    }

    @Override
    public int addArticle(Article article) {
        return articleMapper.addArticle(article);
    }

    @Override
    public int updateByTitle(Article article) {
        return articleMapper.updateByTitle(article);
    }
}
